package vsy.buzzwordbingo.sort;

import vsy.buzzwordbingo.model.Player;

public class PlayerLoginTimeComparator extends OrderedComparator<Player> {
	public PlayerLoginTimeComparator(Order order) {
		super(order);
	}

	@Override
	public int orderedCompare(Player p1, Player p2) {
		return (p1.getLoginTime() < p2.getLoginTime()) ? -1 :
			   (p1.getLoginTime() > p2.getLoginTime()) ? 1 : 0; 
	}
}
